package com.wise.service.cms.content.productindustry.product;

import com.wise.summer.v1.cms.content.product.AddProduct;
import com.wise.summer.v1.cms.content.productindustry.AddProductIndustry;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.summerframework.model.SummerService;
import org.summerframework.model.SummerServiceBean;

@Service
@SummerService
public class AddProductIndustryService implements SummerServiceBean<AddProductIndustry> {

    private static final Integer LENGTH = 20;

    @Override
    public void sum(AddProductIndustry summer) {
        AddProduct addProduct = new AddProduct();
        BeanUtils.copyProperties(summer, addProduct);
        addProduct.setCategoryType(1);
        addProduct.sum();
        summer.setSummerResult(addProduct.getSummerResult());
    }

}
